class Solution:
    def findClosest(self, x: int, y: int, z: int) -> int:
        x_z = abs(z - x)
        x_y = abs(z - y)
        if x_z == x_y:
            return 0
        elif x_z < x_y:
            return 1
        else:
            return 2